import Cookies from 'js-cookie'

const project = {
  state: {
    lookObj: Cookies.get('lookObj') ? JSON.parse(Cookies.get('lookObj')) : null
  },
  mutations: {
    SET_LOOK_OBJ: (state, data) => {
      state.lookObj = data
      Cookies.set('lookObj', data)
    }
  },
  actions: {
    setLookObj({ commit }, data) {
      commit('SET_LOOK_OBJ', data)
    }
  }
}

export default project
